var a=['A','B','C']
var b=a.concat([1,2,3])
var c=a.concat(1,2,3,[4,5])
console.log(b)
console.log(a)
console.log(c)

var arr = ['A', 'B', 'C'];
var c=arr.join('-')
console.log(c)

var e=[['A','B','C'],[20,50,400,6],'-']
console.log(e[1][2])  //输出多维数组中的400
    

var ab=['小明','小红','小张','小李']
if(ab.length===0 || typeof(ab)==='undefined')
{
    console.log('没有同学来')
}else if(ab.length===1)
{
    console.log('欢迎'+ab+'同学')
}else
{
    var lastname=ab[ab.length-1];
    ab.length=ab.length-1;
    ab.join(',')
    console.log('欢迎'+ab+'和'+lastname+'同学')
}
